home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / Javascript / JavaScriptEditor / jse_en28.exe / %MAINDIR% / Library / Status Text Animation.js < prev    next >
Encoding:
Text File  |  2001-09-10  |  1.1 KB  |  44 lines

  1.   <!-- Funny text script by Bart Jellema
  2.     var hellotext="Put your text here ..."
  3.     var thetext=""
  4.     var started=false
  5.     var step=0
  6.     var times=1
  7.  
  8.     function welcometext()
  9.     {
  10.       times--
  11.       if (times==0)
  12.       {
  13.         if (started==false)
  14.         {
  15.           started = true;
  16.           window.status = hellotext;
  17.           setTimeout("anim()",1);
  18.         }
  19.         thetext = hellotext;
  20.       }
  21.     }
  22.  
  23.     function showstatustext(txt)
  24.     {
  25.       thetext = txt;
  26.       setTimeout("welcometext()",4000)
  27.       times++
  28.     }
  29.  
  30.     function anim()
  31.     {
  32.       step++
  33.       if (step==7) {step=1}
  34.       if (step==1) {window.status='>==='+thetext+'===<'}
  35.       if (step==2) {window.status='=>=='+thetext+'==<='}
  36.       if (step==3) {window.status='>=>='+thetext+'=<=<'}
  37.       if (step==4) {window.status='=>=>'+thetext+'<=<='}
  38.       if (step==5) {window.status='==>='+thetext+'=<=='}
  39.       if (step==6) {window.status='===>'+thetext+'<==='}
  40.       setTimeout("anim()",200);
  41.     }
  42.   // Funny text script by Bart Jellema -->
  43.   
  44.   welcometext()